<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$datanav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_lianmerch/index/'),
		array('title'=>'数据中心','icon'=>'icon-zhandianshezhi','action'=>'jy_lianmerch/dindex/'),
		array('title'=>'商户列表','icon'=>'icon-dianpu','action'=>'jy_lianmerch/list/'),
		array('title'=>'销售统计','icon'=>'icon-qitashouru','action'=>'jy_lianmerch/order/'),
	);
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-dianpu','action'=>'jy_lianmerch/merchshop/'),
		array('title'=>'订单','icon'=>'icon-manageorder','action'=>'jy_merch/order.list/'),
		array('title'=>'我的','icon'=>'icon-wo1','action'=>'jy_lianmerch/myhome/'),
	);
	$bankuai1 =array(
		array('title'=>'积分商城','img'=>'../addons/jy_weishop/resource/images/new_icon.png','action'=>'jy_creditshop/index//ismerch=1'),
		array('title'=>'建仓商城','img'=>'../addons/jy_weishop/resource/images/cuxiao.png','action'=>'jy_mjicai/shop//ismerch=1'),
		array('title'=>'分销中心','img'=>'../addons/jy_weishop/resource/images/tejia.png','action'=>'jy_merchjifee/index//ismerch=1'),
		array('title'=>'区域代理','img'=>'../addons/jy_weishop/resource/images/yushou.png','action'=>'jy_area_jifee/index//ismerch=1'),
		array('title'=>'建仓收益','img'=>'../addons/jy_weishop/resource/images/cuxiao.png','action'=>'jy_mjicai/index//ismerch=1'),
	);
	$cube =array(
		array('title'=>'首页','image'=>'../addons/jy_weishop/resource/images/cube01.jpg','action'=>'jy_lianmerch/merchshop/'),
		array('title'=>'全部','image'=>'../addons/jy_weishop/resource/images/cube02.jpg','action'=>'jy_lianmerch/merchshop/'),
		array('title'=>'订单','image'=>'../addons/jy_weishop/resource/images/cube03.jpg','action'=>'jy_lianmerch/merchshop/'),
		array('title'=>'我的','image'=>'../addons/jy_weishop/resource/images/cube04.jpg','action'=>'jy_lianmerch/merchshop/'),
	);
	$merchhdps =array(
		array('title'=>'首页','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp01.jpg','action'=>'jy_lianmerch/merchshop/'),
		array('title'=>'全部','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp02.jpg','action'=>'jy_lianmerch/merchshop/'),
	);
	$return['item']=$this->plugin_setting('basic');
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$return['item']['datanav']=$return['item']['datanav']?$return['item']['datanav']:$datanav;
	$return['item']['bankuai1']=$return['item']['bankuai1']?$return['item']['bankuai1']:$bankuai1;
	$return['item']['cube']=$return['item']['cube']?$return['item']['cube']:$cube;
	$return['item']['merchhdps']=$return['item']['merchhdps']?$return['item']['merchhdps']:$merchhdps;
	$return['item']['appurl']=custom_url('jy_lianmerch/getapp//',true);
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'image','title'=>'网站二维码','name'=>'ewm'),
					array('name'=>'adminmid','title'=>'选择管理员','type'=>'choose','action'=>'core/member.get_member/','help'=>'超级管理员，预留享受消息提现等！'),
					array('type'=>'choose_many','name'=>'workers','title'=>'平台店员','choose_title'=>'选择平台店员','help'=>'店员可以访问总数据平台','action'=>'core/member.get_member/many'),
					array('type'=>'checkbox','title'=>'虚拟币的提现方式','name'=>'withdrawtype','options'=>'withdraw'),
					array('type'=>'unitstring','unit'=>'%','title'=>'提现手续费','name'=>'balance_per'),
					array('type'=>'image','title'=>'首页顶部图片','name'=>'topimg'),
					array('type'=>'string','title'=>'客服链接','name'=>'kflink'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
					'title'=>'界面UI配色',
					'list'=>array(
						array('type'=>'color_pool','title'=>'选择配色方案','name'=>'syscolor','help'=>''),
						array('type'=>'colorpicker','title'=>'站点颜色','name'=>'syscolor','help'=>'自定义系统颜色系，默认： #18bc9c'),
						array('type'=>'phone_tpl','name'=>'syscolor'),
					)
			),
			array(
				'title'=>'幻灯片',
					'list'=>array(
						array(
							'type'=>'array',
							'name'=>'hdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								)
						)
					)
			),
			array(
				'title'=>'平台统计底部导航',
					'list'=>array(
									array('type'=>'array','name'=>'datanav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
					'title'=>'商户商城幻灯片',
					'list'=>array(
						array('type'=>'array','name'=>'merchhdps','title'=>'商户商城幻灯片','add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'图片'),	
									array('type'=>'string','name'=>'url','title'=>'地址'),
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'图片','help'=>'推荐尺寸：自适应'),
									array('type'=>'link','name'=>'url','from'=>'action','title'=>'地址'),
								)
						),
					)
				),
			array(
				'title'=>'商户商城底部导航',
					array('type'=>'string','title'=>'分销中心链接','name'=>'feeurl'),
					'list'=>array(
									array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
					'title'=>'商户商城魔方设置',
					'list'=>array(
						array('type'=>'array','name'=>'cube','add_tip'=>'添加一个魔方',
								'list'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),	
									array('type'=>'string','name'=>'url','title'=>'链接'),
								),
								'details'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),
									array('type'=>'link','name'=>'url','from'=>'action','title'=>'链接'),
								)
						),
					)
			),
			array(
							'title'=>'商户商城板块导航1',
							'list'=>array(
									array('type'=>'updemo','name'=>'bankuai1','demo'=>'demobankuai1','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
									array('type'=>'array','name'=>'bankuai1','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
							)
			),
			array(
				'title'=>'下载APP',
				'list'=>array(
					array('type'=>'copy','title'=>'APP下载地址','name'=>'appurl','help'=>''),
					array('type'=>'ewm','title'=>'APP下载二维码','name'=>'appurl','help'=>''),
					array('type'=>'upfile','title'=>'上传APP安装包','name'=>'installbak'),
				)
			)
		),
	);
	$return['withdraw']=$this->pay_types;
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
